#include<iostream>
#include<vector>
using namespace std;

int sum = 0;//计数

void result(vector<vector<char>>& v, int x, int y){
    if(x<0 || x>=v.size() || y<0 || y>=v[0].size() || v[x][y] == '#')
        return;
    ++sum;
    v[x][y] = '#';
    result(v, x-1, y);
    result(v, x, y-1);
    result(v, x+1, y);
    result(v, x, y+1);
}

void Test1(){
    int m, n;//分别控制行列
    while(cin>>m>>n){
        sum = 0;//清零
        vector<vector<char>> v(m, vector<char>(n));
        int x, y;//起始位置
        for(int i = 0; i < m; ++i){
            for(int j = 0; j < n; ++j){
                cin>>v[i][j];
                if(v[i][j] == '@'){
                    x = i;
                    y = j;
                }
            }
        }
        result(v, x, y);
        cout<<sum<<endl;
    }
}

void Test2(){
    int n, m, k;//表示行列,蘑菇数量
    while(cin>>n>>m>>k){
        vector<vector<int>> mushroom(n+1, vector<int>(m+1, 0)); //蘑菇位置
        vector<vector<double>> mymap(n+1, vector<double>(m+1, 0)); //地图位置
        int x, y;
        for(int i = 0; i < k; ++i){
            cin>>x>>y;
            mushroom[x][y] = 1;//给1表示有蘑菇
        }
        for(int i = 1; i <= n; ++i){
            for(int j = 1; j <= m; ++j){
                //如果在左上角
                if(i == 1 && j == 1) {mymap[i][j] = 1; continue;}
                //如果遇到蘑菇了
                if(mushroom[i][j] == 1) {mymap[i][j] = 0; continue;}
                //如果在右下角
                if(i == n && j == m) {mymap[i][j] = mymap[i-1][j]+mymap[i][j-1]; continue;}
                //如果在最后一列
                if(j == m) {mymap[i][j] = mymap[i-1][j]+mymap[i][j-1]*0.5; continue;}
                //如果在最有一行
                if(i == n) {mymap[i][j] = mymap[i-1][j]*0.5+mymap[i][j-1]; continue;}
                //如果在第一行
                if(i == 1) {mymap[i][j] = mymap[i][j-1]*0.5; continue;}
                //如果在最有一行
                if(i == n) {mymap[i][j] = mymap[i-1][j]*0.5+mymap[i][j-1]; continue;}
                //如果在第一列
                if(j == 1) {mymap[i][j] = mymap[i-1][j]*0.5; continue;}
                mymap[i][j] = mymap[i][j-1]*0.5 + mymap[i-1][j]*0.5;
            }
        }
        printf("%.2lf\n", mymap[n][m]);
    }
}

int main() {
    Test2();
    return 0;
}
